package cn.lym.zxxx.session.impl;

import cn.lym.zxxx.redis.RedisClient;
import cn.lym.zxxx.session.ShareHttpSession;
import cn.lym.zxxx.session.ShareSessionManager;

import javax.servlet.http.HttpSession;
import java.util.List;

public class RedisShareHttpSession extends ShareHttpSession {

    /**
     * redis请求客户端
     */
    private RedisClient redisClient;

    /**
     * redis session属性名称集合对应后缀名
     */
    private final String SESSION_ATTR_NAMES = "ATTR_NAMES";
    /**
     * redis session基础属性名称对应后缀名
     */
    private final String SESSION_BASEDATA = "BASESESSIONDATA";

    public RedisShareHttpSession(String sessionId, ShareSessionManager shareSessionManager, HttpSession httpSession, long createTime, boolean isNew, RedisClient redisClient) {
        super(sessionId, shareSessionManager, httpSession, createTime, isNew);
        this.redisClient = redisClient;
    }

    public RedisClient getRedisClient() {
        return redisClient;
    }

    public void setRedisClient(RedisClient redisClient) {
        this.redisClient = redisClient;
    }

    @Override
    public List<String> getShareAttributeNames() {
        return null;
    }

    @Override
    public long getLastAccessedTime() {
        return 0;
    }

    @Override
    public Object getAttribute(String name) {
        return null;
    }

    @Override
    public void setAttribute(String name, Object value) {

    }

    @Override
    public void removeAttribute(String name) {

    }

    @Override
    public void invalidate() {

    }
}
